class Inventory < ActiveRecord::Base
  attr_accessible :product_id, :quantity, :size, :size_number
  
  belongs_to :product
  # has_many :invoice_items
  
  validates :size, :inclusion => %w(XS S M L XL) 
  validates :size_number , :uniqueness => {:scope => :size, :scope => :product_id} 
  validates :size_number, :quantity, :numericality => true

    
end
